<div class="wide form">

<?php $form = $this->beginWidget('GxActiveForm', array(
	'action' => Yii::app()->createUrl($this->route),
	'method' => 'get',
)); ?>

	<div class="row">
		<?php echo $form->label($model, 'id'); ?>
		<?php echo $form->textField($model, 'id'); ?>
	</div>

	<div class="row">
		<?php echo $form->label($model, 'name'); ?>
		<?php echo $form->textField($model, 'name', array('maxlength' => 200)); ?>
	</div>

	<div class="row">
		<?php echo $form->label($model, 'inprice'); ?>
		<?php echo $form->textField($model, 'inprice'); ?>
	</div>

	<div class="row">
		<?php echo $form->label($model, 'inpercentage'); ?>
		<?php echo $form->textField($model, 'inpercentage'); ?>
	</div>

	<div class="row">
		<?php echo $form->label($model, 'apply_discount_to'); ?>
		<?php echo $form->textField($model, 'apply_discount_to'); ?>
	</div>

	<div class="row">
		<?php echo $form->label($model, 'restrict_by_date'); ?>
		<?php echo $form->textField($model, 'restrict_by_date'); ?>
	</div>

	<div class="row">
		<?php echo $form->label($model, 'valid_from_date'); ?>
		<?php $form->widget('zii.widgets.jui.CJuiDatePicker', array(
			'model' => $model,
			'attribute' => 'valid_from_date',
			'value' => $model->valid_from_date,
			'options' => array(
				'showButtonPanel' => true,
				'changeYear' => true,
				'dateFormat' => 'yy-mm-dd',
				),
			));
; ?>
	</div>

	<div class="row">
		<?php echo $form->label($model, 'valid_to_date'); ?>
		<?php $form->widget('zii.widgets.jui.CJuiDatePicker', array(
			'model' => $model,
			'attribute' => 'valid_to_date',
			'value' => $model->valid_to_date,
			'options' => array(
				'showButtonPanel' => true,
				'changeYear' => true,
				'dateFormat' => 'yy-mm-dd',
				),
			));
; ?>
	</div>

	<div class="row">
		<?php echo $form->label($model, 'maximum_number_of_redemptions_per_code'); ?>
		<?php echo $form->textField($model, 'maximum_number_of_redemptions_per_code'); ?>
	</div>

	<div class="row">
		<?php echo $form->label($model, 'maximum_number_of_redemptions_per_user'); ?>
		<?php echo $form->textField($model, 'maximum_number_of_redemptions_per_user'); ?>
	</div>

	<div class="row">
		<?php echo $form->label($model, 'maximum_number_of_prodcuts_to_discount'); ?>
		<?php echo $form->textField($model, 'maximum_number_of_prodcuts_to_discount'); ?>
	</div>

	<div class="row">
		<?php echo $form->label($model, 'class_restriction'); ?>
		<?php echo $form->textField($model, 'class_restriction'); ?>
	</div>

	<div class="row">
		<?php echo $form->label($model, 'course_restriction'); ?>
		<?php echo $form->textField($model, 'course_restriction'); ?>
	</div>

	<div class="row">
		<?php echo $form->label($model, 'category_restriction'); ?>
		<?php echo $form->textField($model, 'category_restriction'); ?>
	</div>

	<div class="row">
		<?php echo $form->label($model, 'user_restriction'); ?>
		<?php echo $form->textField($model, 'user_restriction'); ?>
	</div>

	<div class="row">
		<?php echo $form->label($model, 'status'); ?>
		<?php echo $form->textField($model, 'status'); ?>
	</div>

	<div class="row">
		<?php echo $form->label($model, 'created'); ?>
		<?php echo $form->textField($model, 'created'); ?>
	</div>

	<div class="row buttons">
		<?php echo GxHtml::submitButton(Yii::t('app', 'Search')); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- search-form -->
